/*
 * ComponentFactory.java - Copyright Apr 13, 2012 Z Networks Group, Inc. All rights reserved.
 * Z Networks Group PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.andromeda.skadi.sandbox;

import com.andromeda.skadi.Service;
import java.util.Map;
import javax.swing.JComponent;
import javax.swing.JPanel;
import org.jdesktop.swingx.JXPanel;

/**
 *
 * @author Dickinson Roman Arismendy Torres
 */
public class ComponentFactory implements Service{

    public <T extends JComponent> T createComponent(Class<T> type) {
        if (type.equals(JPanel.class)) {
            return (T) new JXPanel();
        }
        if (type.equals(JXPanel.class)) {
            return (T) new JXPanel();
        }
        return null;
    }
    public <T extends JComponent> T createComponent(Class<T> type, Map<String,Object> params) {
        if (type.equals(JPanel.class)) {
            return (T) new JXPanel();
        }
        if (type.equals(JXPanel.class)) {
            return (T) new JXPanel();
        }
        return null;
    }

    public void start() {
    }

    public void stop() {
    }
}
